const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');


module.exports = {
    publicPath: './',
    outputDir: 'dist',
    lintOnSave: false,
    css: {
        loaderOptions: {
            scss: {
                prependData: `@import '@/style/index.scss';`
            }
        }
    },
    devServer: {
        port: 8080,
        proxy: {
            '/api': {
                target: 'https://music.163.com/api',
                changeOrigin: true,
                pathRewrite: {
                    '^/api': ''
                }
            }
        }
    },
    configureWebpack: {
        plugins: [
            new BundleAnalyzerPlugin()
        ]
    }
}